package com.hps.mybatisplus.controller;


import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.PageHelper;
import com.hps.mybatisplus.entity.TbUser;
import com.hps.mybatisplus.service.TbUserService;
import org.apache.catalina.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author admin
 * @since 2018-11-16
 */
@RestController
@RequestMapping("/tbUser")
public class TbUserController {

    private TbUserService tbUserService;

    private TbUserController(TbUserService tbUserService) {
        this.tbUserService = tbUserService;
    }

    @GetMapping
    public Page<TbUser> list() {
        Page<TbUser> userPage = new Page<>(1, 10);
        tbUserService.selectPage(userPage);
        return userPage;
    }
}

